AutoAuditCtl = Ext.extend(GridPanelCtl, {

	getCmItems : function() {

		var items = [{
					name : '入点',
					attId : 'inpoint',
					isCm : true
				}, {
					name : '出点',
					attId : 'outpoint',
					isCm : true
				}, {
					name : '时长',
					attId : 'length',
					isCm : true
				}, {
					name : '问题',
					attId : 'problem',
					isCm : true
				}, {
					name : '分类',
					attId : 'vOrA',
					isCm : true
				}]

		return items;
	},
	getCommonConfig : function() {
		
		//var width = cf.getC('gcc').sw * 0.7;

		var config = {
			title : '自动计审信息',
			region : 'east',
			width : 887,
			split : true
		};

		return config;

	},
	getStoreUrl : function() {

		var resource = 'autoAuditList.do';
		var server = cf.getC('s');
		var url = server.getUrl({
					resource : resource,
					act : 'r'
				});
		return url;
	},
	configStore : function(config) {

		var url = this.getStoreUrl();

		var recordTemplet = this.recordTemplet;

		var reader = new Ext.data.JsonReader({
			// totalProperty : "totalSize",
			root : "items" // The property which contains an Array
				// of row objects
			}, recordTemplet);

		var store = new Ext.data.GroupingStore({
					reader : reader,
					url : url,
					// data: xg.dummyData,
					sortInfo:{field: 'inpoint', direction: "ASC"},
					groupField : 'vOrA'
				});

		this.store = store;
		config.store = store;

		return config;
	},
	configOtherPara : function(config) {

		var sm = new Ext.grid.RowSelectionModel();
		config.sm = sm;

		config = this.configView(config);

		return config;
	},
	configView : function(config) {

		config.view = new Ext.grid.GroupingView({
			forceFit : true,
			groupTextTpl : '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
		});

		return config;
	},
	load : function(record) {
		var store = this.store;
		store.baseParams = {
			taskId : record.get('taskId')
		};
		store.load();
	},
	rowcontextmenu : function(g, rowIndex, e) {

	}

});
